package 编程题2;


import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        int [] arr={10,21,71,14,101,14};
        //对数组通过循环进行输入
        for (int   i=0;i<arr.length;i++){
            for (int j=0;j<arr.length-1-i;j++){
                if (arr[j]>arr[j+1]){
                    int  temp=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=temp;
                }
            }
        }
        System.out.println("排序后的输出："+ Arrays.toString(arr));
    }
}
